﻿using Guoc.BigMall.WebService.Dto;
using Guoc.BigMall.Infrastructure.WeChat.Entitys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Guoc.BigMall.Infrastructure.WeChat.JsSdk;

namespace Guoc.BigMall.WebService
{
   public interface IWechatService
    {
 
        /// <summary>
        ///  获取微信接口调用accessToken
        /// </summary>
        /// <returns></returns>
        string GetAccessToken(string storeCode);

        /// <summary>
        /// 网页静默授权，根据code 换取 appid 和 查询用户信息的access_token
        /// </summary>
        /// <param name="appid"></param>
        /// <param name="secret"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        AccessTokenWeb GetAccessTokenByCode(string code, string appid, string appSecret);

        WeChatUserInfo GetWeChatUser(string accessToken, string openid);

        /// <summary>
        ///  jsSdk config 信息
        /// </summary>
        /// <param name="url">要分享得url</param>
        /// <returns></returns>
        JsConfigResult BuildJsSdkConfig(string url, string storeCode);

    }
}
